#type vertex
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTex;

out vec2 FragTex;

void main() {
    gl_Position = vec4(aPos, 1.0);
    FragTex = aTex;
}


#type fragment
#version 330 core

in vec2 FragTex;

out vec4 FragColor;

uniform sampler2D _tIn;
uniform sampler2D _tOut;

uniform int _frame;

void main() {
    vec4 colIn = texture(_tIn, FragTex);
    vec4 colOut = texture(_tOut, FragTex);
    FragColor = mix(
        colOut,
        colIn,
        1.0 / _frame
    );
}
